package com.amsp.oa.oademo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("personnel_archive")
public class PersonnelArchive {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String businessUnit;

    private String department;

    private String employeeName;

    private String gender;

    private String employeeNumber;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate entryDate;

    private String nativePlace;

    private String archiveNumber;

    //@ApiModelProperty("归档日期")
    //@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    //private LocalDate archiveDate;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @TableLogic
    private Boolean isDeleted;
}